<include file="public@header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
            <li class="active"><a href="{:url('activity/index')}">活动列表</a></li>
            <li><a href="{:url('activity/add')}">添加活动</a></li>
            <li><a href="{:url('activity/lst')}">活动报名记录</a></li>
		</ul>
        <form class="well form-inline margin-top-20" method="post" action="{:url('activity/index')}">
            活动名称:
            <input type="text" class="form-control" name="name" value="{:input('request.name/s','')}" placeholder="请输入活动">
            活动状态:
            <select name="status" class="form-control">
                <option value="0">--全部--</option>
                <option <if condition="isset($status) && $status eq '1'"> selected </if> value="1">--下线--</option>
                <option <if condition="isset($status) && $status eq '2'"> selected </if> value="2">--发布--</option>
            </select>
            <input type="submit" class="btn btn-primary" value="搜索" />
            <a class="btn btn-danger" href="{:url('activity/index')}">清空</a>
        </form>
		<table class="table table-hover table-bordered">
			<thead>
				<tr>
                    <th width="50">ID</th>
                    <th>活动名称</th>
                    <th>活动banner</th>
                    <th>限定人数</th>
                    <th>活动内容</th>
                    <th>活动地区</th>
                    <th>活动状态</th>
                    <th>添加时间</th>
                    <th>{:lang('ACTIONS')}</th>
				</tr>
			</thead>
			<tbody>
                <foreach name="list" item="vo">
                    <tr>
                        <td>{$vo.id}</td>
                        <td>{$vo.name}</td>
                        <td><img style="width:100px;height:50px;" src="{$vo.img}" alt=""></td>
                        <td>{$vo.num}</td>
                        <td>{$vo['content']|mb_substr=0,18}</td>
                        <td>{$vo.city}</td>
                        <td>{$vo['status'] == 1 ? '下线' : '发布'}</td>
                        <td>{$vo.addtime}</td>
                        <td>
                            <a class="btn btn-xs btn-primary" href="{:url('activity/edit',array('id'=>$vo['id']))}">{:lang('EDIT')}</a>
                            <a class="btn btn-xs btn-danger" href="{:url('activity/delete',array('id'=>$vo['id']))}">删除</a>
                            <a class="btn btn-xs btn-info" href="{:url('activity/lst',array('id'=>$vo['id']))}">报名记录</a>
                        </td>
                    </tr>
                </foreach>
			</tbody>
		</table>
		<div class="pagination">{$page}</div>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
</body>
</html>